package org.arch_learn.netty_rpc.netty_rpc_api.common;

public class RpcResponse {

    private String responseId;

    private String error;

    private Object result;

    public RpcResponse(String responseId, String error, Object result) {
        this.responseId = responseId;
        this.error = error;
        this.result = result;
    }

    public RpcResponse() {
    }

    public String getResponseId() {
        return responseId;
    }

    public void setResponseId(String responseId) {
        this.responseId = responseId;
    }

    public String getError() {
        return error;
    }

    public void setError(String error) {
        this.error = error;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }

    @Override
    public String toString() {
        return "RpcResponse{" +
                "responseId='" + responseId + '\'' +
                ", error='" + error + '\'' +
                ", result=" + result +
                '}';
    }
}
